#include "fishbot_setparam/amcl_setparam.h"
void AmclParamUpdater::update(double kld_error)
{
  // 设置参数
  auto future = parameters_client_->set_parameters({rclcpp::Parameter("scan_topic", "scan"),
                                                    rclcpp::Parameter("kld_error", kld_error)});
  RCLCPP_INFO_STREAM(rclcpp::get_logger("AmclParamUpdater"),": amcl_setparam_start  update"<< kld_error);
  // 处理回调
  // future.wait();
}

// int main(int argc, char **argv)
// {
//   rclcpp::init(argc, argv);
//   auto node = std::make_shared<AmclParamUpdater>();
//   node->update();
//   rclcpp::spin(node);
//   rclcpp::shutdown();
//   return 0;
// }
